// 包裝  i-cascader 组件
import { extractModel } from '@/utils/tools'

export default {
    name:'c-i-cascader',
    functional:true,
    

    render (h, context){
        let {value, callback, conf} = extractModel(context);
        
        let {
            renderFormat,
            filterable,
            notFoundText,
            changeOnSelect,
            
            data,
            size,
            disabled,
            clearable,
            placeholder,
            trigger,
            loadData,
            transfer,

        } = conf

        return (

            <cascader
            render-format={renderFormat}
            filterable={filterable}
            not-found-text={notFoundText}
            change-on-select={changeOnSelect}
            load-data={loadData}
            
            data={data}
            size={size || 'small'}
            disabled={disabled}
            clearable={clearable}
            placeholder={placeholder}
            trigger={trigger}
            transfer={transfer} 
            value={value || []}

            onInput={callback}
            >
            </cascader>

            
        )
        
        
    }
    
    
}